//
//  KCRLVC.m
//  Golden
//
//  Created by king on 2022/7/27.
//  Copyright © 2022 KC. All rights reserved.
//

#import "KCRLVC.h"
#import "KCRLCell.h"

@interface KCRLVC ()<UITableViewDelegate,UITableViewDataSource>

@property (nonatomic,strong)UITableView *tableView;

@end

@implementation KCRLVC

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [ShareApplication setStatusBarHidden:NO];
}
- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    [ShareApplication setStatusBarHidden:YES];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.KCTitleLable.text = @"全部色系";
    self.view.backgroundColor = WHITE_COLOR;
    _tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, self.navigationHeight, SCREEN_WIDTH, SCREEN_HEIGHT - self.navigationHeight)
                                             style:UITableViewStyleGrouped];
    _tableView.delegate = self;
    _tableView.dataSource = self;
    _tableView.backgroundColor = WHITE_COLOR;
    _tableView.separatorStyle = 0;
    [self.view addSubview:_tableView];
}

#pragma mark -Actions

- (void)closeAction {
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return [KCSingle shareInstance].nameArray.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    KCRLCell *cell = [KCRLCell cellWithTableView:tableView];
    cell.nameStr = [KCSingle shareInstance].nameArray[indexPath.row];
    cell.colorStr = [KCSingle shareInstance].colorArray[indexPath.row];
    return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 100;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
    return CGFLOAT_MIN;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    return 100;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
    return [UIView new];
}
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
    return [UIView new];
}


@end
